{extend name="common/base" /}

{block name="title"}<title>{$title}</title>{/block}

{block name="main"}
<div class="layui-fluid table">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form" lwid100="" iwid300="" lay-filter="form">

                        {include file="common/form" /}

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="form">保存</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}


<script>
    {block name="layui_table"}
    var index = parent.layer.getFrameIndex(window.name);

    $('#close').on("click",function () {
        parent.layer.close(index);
    });

    form.on('submit(form)', function(data){
        var data = form.val('form');
        $.ajax({
            url: '/backmanage/flow_up_num/create'
            ,data: data
            ,type: 'POST'
            ,success(res){
                if(typeof  res == "string"){
                    res = JSON.parse(res);
                }
                if (res.code == 0){
                    parent.layer.close(index);
                    parent.layer.msg(res.msg, {icon: 1});
                    parent.layui.table.reload('table');
                } else{
                    layer.msg(res.msg);
                }
            }
        });
    });


    var list_url,cols ='';
    {/block}
</script>

